package com.tensquare.base.exception;

import enums.ExceptionEnum;

/**
 * @program: tensquare_parent
 * @description: 自定义异常
 * @author: NieMiao
 * @create: 2018-12-13 16:58
 **/
public class BaseException extends RuntimeException{
    private Integer code;

    public BaseException(Integer code,String message) {
        super(message);
        this.code = code;
    }
    public BaseException(ExceptionEnum e) {
        super(e.getMessage());
        this.code = e.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
